<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<div id="app">
    <form v-on:submit.prevent="onSubmit">
        <input type="text" v-model="name">
        <input type="text" v-model="age">
        <input type="submit" value="Submit">
    </form>
</div>
</body>
<script src="../../vender/vue@2.4.2.js"></script>
<script>

    var vm=new Vue({
        el:'#app',
        data:{
            name:'20个字符以内',
            age:'数值'
        },
        methods:{
            onSubmit:function(){
                console.log('$data:',this.$data);
                return true;
            }
        }
    });

</script>
</html>